package com.csun.cmny.provider.service;

import com.csun.cmny.base.dto.LoginAuthDto;
import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.DmcRfidEventOldman;
import com.csun.cmny.provider.model.dto.rfid.RfidEventOldmanDealDto;
import com.csun.cmny.provider.model.dto.rfid.RfidEventOldmanQueryDto;
import com.csun.cmny.provider.model.vo.rfid.DmcRfidEventOldmanVo;
import com.csun.cmny.provider.model.vo.rfid.DmcRfidLabelVo;
import com.csun.cmny.provider.model.vo.rfid.DmcRfidReaderVo;

import java.util.List;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-08-24 10:13
 * @Description: the interface dmc rfid event oldman service
 */
public interface DmcRfidEventOldmanService extends IService<DmcRfidEventOldman> {

    /**
     * select the last times rfid reader one of oldman
     *
     * @param dmcRfidReaderVo   the dmc rfid reader vo
     * @param dmcRfidLabelVo    the dmc rfid label vo
     *
     * @return  the dmc rfid event oldman vo
     */
    DmcRfidEventOldmanVo selectFirstRfidEvent(DmcRfidReaderVo dmcRfidReaderVo, DmcRfidLabelVo dmcRfidLabelVo);

    /**
     * query dmc rfid event oldman list with page
     *
     * @param rfidEventOldmanQueryDto   the rfid event oldman query dto
     *
     * @return  the list
     */
    List<DmcRfidEventOldmanVo> queryListWithPage(RfidEventOldmanQueryDto rfidEventOldmanQueryDto);

    /**
     * deal rfid event oldman out notify
     *
     * @param rfidEventOldmanDealDto    the rfid event oldman deal dto
     * @param loginAuthDto  the login auth dto
     *
     * @return  the int.
     */
    Integer dealOldmanOutNotify(RfidEventOldmanDealDto rfidEventOldmanDealDto, LoginAuthDto loginAuthDto);

    /**
     * delete by label id
     *
     * @param deviceId  the device id (rfid label id)
     *
     * @return  the int.
     */
    Integer deleteByLabelId(Long deviceId);

    /**
     * delete by reader id
     *
     * @param deviceId  the device id (rfid reader id)
     *
     * @return  the int.
     */
    Integer deleteByReaderId(Long deviceId);
}
